package com.lqk.strategy.improve;

/**
 * @author lqk
 * @date 2021/12/13 13:21
 */
public class ToyDuck extends Duck {
    public ToyDuck() {
        flyBehavior = new NoFlyBehavior();
    }

    @Override
    public void display() {
        System.out.println("~~玩具鸭~~");
    }

    // 需要重写所有父类方法
    @Override
    public void quack() {
        System.out.println("玩具鸭不能叫~~");
    }

    @Override
    public void swim() {
        System.out.println("玩具鸭不会游泳~~");
    }

}
